package ch.fusun.baron.printing.service.impl;

import java.util.List;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.printing.MessagingService;

/**
 *
 */
public class AddMessagesDataUpdate implements DataUpdate {

	private List<GameMessage> messages;
	@Inject
	private transient MessagingService messagingService;

	/**
	 * Kryo
	 */
	public AddMessagesDataUpdate() {
	}

	/**
	 * @param messages
	 *            The messages
	 */
	public AddMessagesDataUpdate(List<GameMessage> messages) {
		this.messages = messages;
	}

	@Override
	public void update() {
		messagingService.addMessages(messages);
	}

}
